home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cbibcode.arc
/
FABS.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1991-08-05
|
313 b
|
16 lines
/* fabs.c function, from p.210 of turbo c bilbe */
#include<stdio.h>
#include<math.h>
main(int argc, char **argv)
{
double result;
if(argc < 2)
{
printf("Usage %s <value>\n", argv[0]);
}
else
{
result = fabs(atof(argv[1]));
printf("abslute value of %s = %f \n", argv[1], result);
}
}